package a.student.library;

import android.R.integer;
import android.database.Cursor;

	/*
	
		Class name: Contact.java
		Function: Day la lop chua thong tin chi tiet cua mot Contact. 
			Lop nay don gian chi chua cac Constructor de khoi tao doi tuong dung luu tru du lieu.
		
	*/
	
public class Contact extends BaseDto{
	public int id;
	public String name;
	public String phoneNo;
	public String email;
	public String website;
	public String note;
	public String photo;
	public String address;
	public String type;
	
//	cv.put("CT_Name", contactInfo.getName());
//	cv.put("Email", contactInfo.getEmail());
//	cv.put("PhoneNo", contactInfo.getPhoneNo());
//	cv.put("Type", contactInfo.type);
//	cv.put("Website", contactInfo.website);
//	cv.put("Note", contactInfo.note);
//	cv.put("Address", contactInfo.address);
//	cv.put("Photo", contactInfo.photo);
	
	public static final String CONTACT_ID = "CT_ID";
	public static final String CONTACT_NAME = "CT_Name";
	public static final String CONTACT_EMAIL = "Email";
	public static final String CONTACT_PHONENO = "PhoneNo";
	public static final String CONTACT_TYPE = "Type";
	public static final String CONTACT_WEBSITE = "Website";
	public static final String CONTACT_NOTE = "Note";
	public static final String CONTACT_ADDRESS = "Address";
	public static final String CONTACT_PHOTO = "Photo";
	
	public static final String CONTACT_TBLNAME = "Contact";
	public static final String CONTACT_DEFAULT_SORT_ORDER = CONTACT_ID + " ASC";
	
	public Contact() {
		super();
	}
	
	public Contact(Cursor c) {
		super();
		this.id=c.getInt(c.getColumnIndex(CONTACT_ID));
		this.name=c.getString(c.getColumnIndex(CONTACT_ID));
		this.email = c.getString(c.getColumnIndex(CONTACT_ID));
		this.phoneNo = c.getString(c.getColumnIndex(CONTACT_ID));
		this.type = c.getString(c.getColumnIndex(CONTACT_ID));
		this.website = c.getString(c.getColumnIndex(CONTACT_ID));
		this.note = c.getString(c.getColumnIndex(CONTACT_ID));
		this.address = c.getString(c.getColumnIndex(CONTACT_ID));
		this.photo = c.getString(c.getColumnIndex(CONTACT_ID));
		
		
	}
	
	public Contact(int id,String name) {
		this.id = id;
		this.name = name;
	}
	public Contact(String[] info) {
		// TODO Auto-generated constructor stub
		this.id = Integer.valueOf(info[0]);
		this.name = info[1];
		this.phoneNo = info[2];
		this.email = info[3];
		this.website = info[4];
		this.note = info[5];
		this.photo = info[6];
		this.address = info[7];
	}
	public Contact(int id,String name,String phoneNo,String email,String website,String note,String photo,String address,String type) {
		// TODO Auto-generated constructor stub
		this.id=id;
		this.name=name;
		this.phoneNo = phoneNo;
		this.email = email;
		this.website = website;
		this.note = note;
		this.photo = photo;
		this.address = address;
		this.type = type;
	}
	public Contact(int id, String name, String email, String phoneNo) {
		this.id = id;
		this.name = name;
		this.email = email;
		this.phoneNo = phoneNo;
	}

	public int getContactId() {
		return id;
	}
	public void setContactId(int id) {
		this.id = id;
	}
	public String getName(){
		return name;
	}
	public String getEmail(){
		return email;
	}
	public String getPhoneNo(){
		return phoneNo;
	}
	public String getWebsite(){
		return website;
	}
	public String getNote(){
		return note;
	}
	public String getPhoto(){
		return photo;
	}
	public String getAddress(){
		return address;
	}


}
